<template>   
    <div class="mui-numbox" :data-numbox-min="min" :data-numbox-max="max" style="height:25px;">
        <button class="mui-btn mui-btn-numbox-minus" type="button">-</button>
        <input class="mui-input-numbox" type="number" v-model="currentValue" @change="setCount" ref="shop_num">
        <button class="mui-btn mui-btn-numbox-plus" type="button">+</button>
    </div>
</template>

<script>
import mui from "../../lib/mui/js/mui.min.js";
export default {
    props:["min","max","currentValue","id"],
    data(){
        return {
            
        }
    },
    mounted(){
        mui(".mui-numbox").numbox();
    },
    methods:{
        setCount(){
            this.$store.commit("updateTocar",{id:this.id,count:parseInt(this.$refs.shop_num.value)});
        }
    }
}
</script>
<style lang="less" scoped>

</style>